const numberFormat = {
    //展示整数变小数
    showDecimal: function (num, fixed) {
        let numObj = parseFloat(num / 100);
        return numObj.toFixed(fixed || 2);
    },

    //展示小数变整数
    toInteger: function (num) {
        num = parseFloat(num);
        return parseInt((num * 100).toFixed(2));
    },
}

export default numberFormat;